﻿using System;
using System.Collections.Generic;
using System.Text;

namespace BLL
{
    public class CommentBase
    {
        /// <summary>
        /// 新建评论
        /// </summary>
        public static void CreateComment(Model.CommentBase _comment, out string result)
        {
            (new SQLServerDAL.CommentBase()).CreateComment(_comment, out result);
        }
        /// <summary>
        /// 修改评论
        /// </summary>
        public static void ModifyComment(Model.CommentBase _comment, out string result)
        {
            (new SQLServerDAL.CommentBase()).ModifyComment(_comment, out result); 
        }
        /// <summary>
        /// 审核评论
        /// </summary>
        public static void ApproveComment(string commentid, string approvedby, int statuscode, out string result)
        {
            (new SQLServerDAL.CommentBase()).ApproveComment(commentid, approvedby, statuscode, out result);  
        }
        /// <summary>
        /// 删除评论
        /// </summary>
        public static void Delete(string commentid, out string result)
        {
            (new SQLServerDAL.CommentBase()).Delete(commentid, out result);  
        }

        /// <summary>
        /// 查询评论
        /// </summary>
        /// <returns></returns>
        public static Model.CommentBase GetObjectById(string commentId)
        {
            return (new SQLServerDAL.CommentBase()).GetObjectById(commentId);
        }

        /// <summary>
        /// 更新品论信息
        /// </summary>
        public static void UpdateInfoByParms()
        {

        }

        /// <summary>
        /// 回复评论
        /// </summary>
        public static void CreateReview(Model.CommentReviewBase _comment, out string result)
        {
            (new SQLServerDAL.CommentBase()).CreateReview(_comment, out result);
        }
        /// <summary>
        /// 修改回复
        /// </summary>
        public static void ModfiyReview(Model.CommentReviewBase _comment, out string result)
        { 
            (new SQLServerDAL.CommentBase()).ModfiyReview(_comment, out result);
        }
        /// <summary>
        /// 审核回复
        /// </summary>
        public static void ApproveReview(string reviewId, int statuscode, out string result)
        {
            (new SQLServerDAL.CommentBase()).ApproveReview(reviewId, statuscode, out result);
        }
        /// <summary>
        /// 删除回复
        /// </summary>
        public static void DeleteReview(string reviewId, out string result)
        {
            (new SQLServerDAL.CommentBase()).DeleteReview(reviewId, out result); 
        }

        /// <summary>
        /// 查询回复记录
        /// </summary>
        /// <param name="commentId"></param>
        /// <returns></returns>
        public IList<Model.CommentReviewBase> GetReviewList(string commentId)
        {
            return null;
        }
    }
}
